home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 44
/
Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso
/
-in_the_mag-
/
basics
/
amos
/
multiwindows.lha
/
MultiWindows
/
Gadgets.doc
< prev
next >
Wrap
Text File
|
1999-01-04
|
4KB
|
156 lines
** Ensure you have setpatch running, and a recent version of AmosPro
AmosPro V1.00 fails when testing these programs!!
I couldn't get AmosPro 2.00 to start on my unexpanded 1200, but
it works fine with my accelerator -- any suggestions??
Manual for gadget procedures as seen in RasterMaster 1.6 and MultiWindows
These instructions are only as a rough guide, since I copied them
out of my old, dog-eared amos notebook without checking. The code
is very old in parts, and probably hasn't been fully checked.
---
Notes on Multiwindows.
In MultiWindows, there are a number of extra parameters for the
different windows etc. The example program should make it clearer,
though.
If you get stuck, you could try emailing me for help. I'm not that
interested in writing a huge document for an enormous, partly obsolete
program that I'm giving away free!
My adress is : M.D.Cameron@durham.ac.uk
The AGads2.1 gadgets are not window-based, and this document is
more relevant to those. The windows was a sort of last-minute(?)
addition.
---
Set the gadget variables at the start of the program to the number of
gads you want to use.
Gad_Setcolours[Black,White,Grey,Blue]
Used to tell the system which colours of your screen palette to use
when drawing the gadgets.
Gadscan
Call this as frequently as possible in your main loop. It is optimised
and should not slow your program down too much. The number of the gadget
selected will be returned in Param.
Gadtype[Gadnum]
Will return in Param the type of gadget reserved in the slot you specify
Numbers are as follows:
2 - Button(text)
5 - Text input gadget
6 - (Alpha)numerical display
7 - Cycle gadget
13 - Vslider
15 - Hslider
17 - Checkbox
20 - Sbut
23 - Horizontal Slider button
25 - Vertical Slider button
32 - Radiobuttons
Dont trust them though!
---
Gad_Button_create[Gadnum,X,Y,TEXT$]
Creates and reserves a text button. Self explanatory.
---
Gad_text_create[Gadnum,X,Y,HSize,Text$,Type]
Creates a Text entry gadget. Hsize is measured in chars.
Type is as follows: 0 - Alphanumerical
1 - Numerical
Gad_text_input[Gadnum]
Activates a text input gadget and returns the value in param$.
Gad_text_next[gadnum]
Returns the number of the next text gadget, so that intuition-like
interfaces can be created.
---
Gad_cycle_create[gadnum,x,y,length,item1$]
Creates a cycle gadget with one item in the cycle list.
Gad_cycle_additem[gadnum,item$]
Adds an item to the cycle list.
Gad_cycle_get[gadnum]
Returns the number of the item that cycle gadget is set to.
---
Gad_display_create[gadnum,x,y,length,text$]
Creates a text display.
Gad_display_set[gadnum,text$]
Sets a display with the text supplied.
---
Sliders
Er ... I changed the slider routines a couple of months ago and I can't be
arsed finding out how they work. At least they're fast now. There's plenty
of examples how they work in RasterMaster1.6 - on the Aminet. They're pretty
straight-forward from what I remember, just call the slider-update procedure
when the gadget loop returns your slider number.
---
Gad_Sbut_create[etc]
These are custom buttons which can be any shape and have any graphics inside
them. Styles are as follows:
1 - Thin, Custom graphics may be placed inside.
2 - Thin, No custom graphics may be placed inside.
3 - Thick, for Hires screenmode, Custom graphics.
4 - Thick, as above, No custom graphics.
---
Checkboxes, file selectors, infoboxes, requesters etc are easy to use.
Radiobuttons are "attached" to each other by means of specifying the
same "cluster", or group number for each one. That way when a radiobut
is pushed, all the others in the same group will pop up.
---
Hope this helps...
Mart, 1998.
E-Mail : M.D.Cameron@durham.ac.uk
Eof.